package com.ngc.mall.controller;

import com.ngc.mall.common.configure.response.ResponseResult;
import com.ngc.mall.domain.GridCategoryDomain;
import com.ngc.mall.service.IGridCategoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/grid-category")
public class GridCategoryController {

    @Resource
    private IGridCategoryService iGridCategoryService;

    @GetMapping("/list")
    public ResponseResult<List<GridCategoryDomain>> list(){
        return ResponseResult.success(iGridCategoryService.selectAll());
    }
}
